﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DTOs;

namespace giftdeliveryservice.Controllers
{
    public class PaymentController : Controller
    {
        private InvoiceDTO _selectedInvoice = new InvoiceDTO();
        public InvoiceDTO SelectedInvoice
        {
            get
            {
                if (_selectedInvoice == null)
                {
                    _selectedInvoice = new InvoiceDTO();
                    Session["Invoice"] = _selectedInvoice;
                }

                if (_selectedInvoice.InvoiceId == "")
                {
                    try
                    {
                        _selectedInvoice = (InvoiceDTO)Session["Invoice"];
                    }
                    catch { }
                }
                return _selectedInvoice;
            }
        }


        //
        // GET: /Payment/

        public ActionResult Processing()
        {
            return View(SelectedInvoice);
        }

        public ActionResult Receipt()
        {
            return View();
        }


    }
}
